import random
ran1 = [random.randrange(1,21) for _ in range(20) ]
count1 = {}
for i in ran1:
    if i in count1:
        count1[i] = count1[i] + 1
    else:
        count1[i] = 1
   
count2 = sorted(count1.items(),key = lambda item:item[1],reverse = True)

print(count2[:3])


# 完成的不错
